tests: Make icontheme test installable
authorMatthias Clasen <mclasen@redhat.com>
Wed, 21 May 2014 17:46:49 +0000 (13:46 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 21 May 2014 17:46:49 +0000 (13:46 -0400)
To make the icontheme test run successfully when installed,
we need to use the correct test-framework-provided location,
and we need to install the test theme without stripping its
subdirectory structure.

testsuite/gtk/Makefile.am
testsuite/gtk/icontheme.c

index 615c9fc1aef0d1de46e0cf8563239e6301ba239f..10301c68e6f0661db5630fc5719d84104321fd50 100644 (file)
@@ -162,7 +162,7 @@ all-am: gschemas.compiled
 if BUILDOPT_INSTALL_TESTS
 insttestdir = $(pkglibexecdir)/installed-tests
 insttest_PROGRAMS = $(TEST_PROGS)
-insttest_DATA = $(test_icontheme)
+nobase_insttest_DATA = $(test_icontheme)
 
 %.test: %$(EXEEXT) Makefile
        $(AM_V_GEN) (echo '[Test]' > $@.tmp; \
index d4f4783f0ad0c5c84b340151e7ae81fbf90fbad7..c72d50d0a02b5ccdd912459bcbcd4ac2d3779d38 100644 (file)
@@ -15,7 +15,7 @@ get_test_icontheme (void)
 
   icon_theme = gtk_icon_theme_new ();
   gtk_icon_theme_set_custom_theme (icon_theme, "icons");
-  current_dir = g_get_current_dir ();
+  current_dir = g_test_get_dir (G_TEST_DIST);
   gtk_icon_theme_set_search_path (icon_theme, &current_dir, 1);
 
   return icon_theme;